namespace SubhadraSolutions.Sharp.Logging
{
    using SubhadraSolutions.Sharp.Utils.Diagnostics;
    using SubhadraSolutions.Sharp.Utils.IO;

    public sealed class LoggingSettings
    {
        #region Fields

        private static readonly LoggingSettings _instance = new LoggingSettings();

        private string _logsFolderDefaultPath;

        #endregion Fields

        #region Constructors

        private LoggingSettings()
        {
            LogsFolderDefaultPath = IOHelper.ResolvePath("Logs");
        }

        #endregion Constructors

        #region Properties

        public static LoggingSettings Instance
        {
            get { return _instance; }
        }

        public string LogsFolderDefaultPath
        {
            get { return _logsFolderDefaultPath; }
            set
            {
                if (value != null)
                {
                    value = value.TrimEnd('\\', '/');
                }
                _logsFolderDefaultPath = value;
            }
        }

        #endregion Properties
    }
}